package sample.plugin.model;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

 
/**
 * The Class SuiteDto.
 */
public class SuiteDto implements Serializable {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1215562989504230558L;
	
	
	/** The case list. */
	private List<CaseIntroDto> caseList;
	
	
	private String outputFileName;
	
	/**
     * 測試項目編號
     * Test item number.
     *
     * @return the string
     */
	private  String testItemNo;
    
    /**
     * 測試項目名稱
     * Test item name.
     *
     * @return the string
     */
	private  String testItemName;    
    
    /**
     * 需求單元編號
     * Requirement unit number.
     *
     * @return the string
     */
	private  String requireUnitNo;
    
    /**
     * 撰寫人員
     * Author.
     *
     * @return the string
     */
	private   String author;
    
    /**
     * 撰寫日期
     * Compose date.
     *
     * @return the string
     */
	private  String composeDate;

	/**
	 * Gets the test item no.
	 *
	 * @return the test item no
	 */
	public String getTestItemNo() {
		return testItemNo;
	}

	/**
	 * Sets the test item no.
	 *
	 * @param testItemNo the new test item no
	 */
	public void setTestItemNo(String testItemNo) {
		this.testItemNo = testItemNo;
	}

	/**
	 * Gets the test item name.
	 *
	 * @return the test item name
	 */
	public String getTestItemName() {
		return testItemName;
	}

	/**
	 * Sets the test item name.
	 *
	 * @param testItemName the new test item name
	 */
	public void setTestItemName(String testItemName) {
		this.testItemName = testItemName;
	}

	/**
	 * Gets the require unit no.
	 *
	 * @return the require unit no
	 */
	public String getRequireUnitNo() {
		return requireUnitNo;
	}

	/**
	 * Sets the require unit no.
	 *
	 * @param requireUnitNo the new require unit no
	 */
	public void setRequireUnitNo(String requireUnitNo) {
		this.requireUnitNo = requireUnitNo;
	}

	/**
	 * Gets the author.
	 *
	 * @return the author
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * Sets the author.
	 *
	 * @param author the new author
	 */
	public void setAuthor(String author) {
		this.author = author;
	}

	/**
	 * Gets the compose date.
	 *
	 * @return the compose date
	 */
	public String getComposeDate() {
		return composeDate;
	}

	/**
	 * Sets the compose date.
	 *
	 * @param composeDate the new compose date
	 */
	public void setComposeDate(String composeDate) {
		this.composeDate = composeDate;
	}

	/**
	 * Gets the case list.
	 *
	 * @return the case list
	 */
	public List<CaseIntroDto> getCaseList() {
		if(caseList == null){
			caseList = new ArrayList<CaseIntroDto>();
		}
		return caseList;
	}

	/**
	 * Sets the case list.
	 *
	 * @param caseList the new case list
	 */
	public void setCaseList(List<CaseIntroDto> caseList) {
		this.caseList = caseList;
	}
	public int getTotalNoOfCases(){
		return getCaseList().size();
	}
	
	public String getToday(){
		final SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		sdf.format(new Date());
		return sdf.format(new Date());
	}
}
